package piece1.chapter5;

public class Problem5_07 {

    /**
     * @param args
     */
    public static void main(String[] args) {
	// TODO 自动生成的方法存根
	int num[] = new int[100];
	for (int i = 0; i < num.length; i++) {
	    num[i] = (int) (Math.random() * 10);
	}
	int count[] = new int[10];

	for (int i = 0; i < num.length; i++) {

	    count[num[i]]++;
	}

	for (int i = 0; i < count.length; i++) {
	    System.out.println(i + "出现" + count[i] + "次");
	}

    }

}
